//
//  JUPeopleAnnotationView.m
//  findFriend
//
//  Created by ju on 14-9-13.
//  Copyright (c) 2014年 dono. All rights reserved.
//

#import "JUPeopleAnnotationView.h"
#import "JUPeopleAnnotation.h"

@implementation JUPeopleAnnotationView
{
    AVUser *_user;
}

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
    }
    return self;
}

- (id)initWithAnnotation:(id<BMKAnnotation>)annotation reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithAnnotation:annotation reuseIdentifier:reuseIdentifier];
    if (self) {
        if ([annotation isKindOfClass:[JUPeopleAnnotation class]]) {
            JUPeopleAnnotation *ann = (JUPeopleAnnotation *)annotation;
            _user = ann.user;
        }
        
        UIImageView *logo = [[UIImageView alloc] initWithFrame:CGRectMake(2, 2, 20, 20)];
        logo.layer.cornerRadius = 10;
        [logo clipsToBounds];
        logo.image = [UIImage imageNamed:@"head"];
        logo.backgroundColor = [UIColor lightGrayColor];
        [self addSubview:logo];
        
        self.canShowCallout=NO;  //在点击大头针的时候会弹出那个黑框框
        self.draggable=NO;
        self.image = nil;
        self.image = [UIImage imageNamed:@"locate"];
    }
    return self;
}





@end
